from celery import Celery
import time
app = Celery('tasks', broker='redis://localhost/1')


@app.task()
def celery():
    print('===开始===')
    time.sleep(3)
    print('===结束===')